#ifndef CONVERT_H__
#define CONVERT_H__ 


#include <stdint.h>

extern const unsigned char HEX_CODE_TABLE[];

int conv_uint32_to_bcd(uint32_t data, char *res );

int conv_uint32_to_bcd_with_width_specify(uint32_t data, char *res, int width);

int conv_uint32_to_string( uint32_t data, char *res);

int conv_uint16_to_string( uint16_t data, char *res);

int conv_uint8_to_string( uint8_t data, char *res);

int conv_uint32_to_string_hex( uint32_t data, char *res);

int conv_uint8_to_string_hex_format(uint8_t data, char *res);

int conv_uint8_to_string_with_prefix(uint8_t data, char *res, char* prefix);

int conv_uint8_to_string_with_suffix(uint8_t data, char *res, char* suffix);

int conv_data_cat_string_to_datetime_format(uint8_t data0, uint8_t data1, char *res, char split);

int conv_data_to_version(uint32_t version, char* string);

int conv_mac_to_string(uint8_t *mac, char* string);

int conv_utf8_to_unicode_cnt(const uint8_t * utf8, uint16_t len);

int conv_encoding_utf8_to_unicode(const uint8_t *utf8, uint16_t len_of_utf8, uint16_t *unicode, uint16_t max_len_of_unicode); 

int conv_encoding_utf8_to_unicode_get_cnt(const uint8_t *utf8, uint16_t len_of_utf8); 

//int conv_format(char* s, const char* fmt, ...); 

int conv_ancs_datetime( uint8_t * strings, uint8_t len, uint16_t* year, uint8_t* month, uint8_t* day, uint8_t* hour, uint8_t* minute, uint8_t* second); 

#endif // !CONVERT_H__
